home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Tele / C / Comet2.1.3.cpt / 3270XCMD / TNdrvr.h < prev    next >
Text File  |  1990-03-21  |  1KB  |  64 lines

  1. /* TNdrvr.h -- copyright 1989 Cornell University */
  2.  
  3. #define HTN_OPEN    100
  4. #define HTN_CONNECT    101
  5. #define HTN_CLOSE    102
  6. #define HTN_QUIT    103
  7. #define HTN_SENDSTR    104
  8. #define HTN_SENDCMD    105
  9. #define HTN_CURSOR    106
  10. #define HTN_DRAW    107
  11. #define HTN_STATUS    108
  12.  
  13. #define HTN_INIT    200
  14.  
  15. /* failure codes */
  16.  
  17. #define HTNR_NOTN    -1001
  18. #define HTNR_ACTIVE    -1002
  19. #define HTNR_OPEN    -1003
  20. #define HTNR_NAME    -1004
  21. #define HTNR_ADDR    -1005
  22. #define HTNR_CLASS    -1006
  23. #define HTNR_ENTRY    -1007
  24.  
  25. /* status codes */
  26.  
  27. #define HTNS_RUNNING    0
  28. #define HTNS_WAITCONN    -2000
  29. #define HTNS_NEWDATA    -2001
  30. #define HTNS_WAITNET    -2002
  31. #define HTNS_KBDLOCK    -2003
  32. #define HTNS_MORE        -2004
  33. #define HTNS_HOLDING    -2005
  34. #define HTNS_CP            -2006
  35. #define HTNS_VMREAD        -2007
  36.  
  37. /* misc. */
  38.  
  39. #define HTNI_BUFSIZE    1945    /* (24 * 80) + 24 (CRs) + 1 NULL terminator */
  40. #define ROW_SIZE          80    /* 80 chars per row */
  41. #define ATTR              32    /* high bit set on tn3270 attributes */
  42. #define CR                0x0D    /* carriage return character */
  43.  
  44. struct storage {
  45.     /* 3270 pointers to routines */
  46.     OSErr (*tnopen)();
  47.     OSErr (*tnconnect)();
  48.     OSErr (*tnstatus)();
  49.     OSErr (*tnclose)();
  50.     OSErr (*tnquit)();
  51.     OSErr (*tnsendstr)();
  52.     OSErr (*tnsendcmd)();
  53.     OSErr (*tndraw)();
  54.  
  55.     /* 3270 pointers to data */
  56.     char * tnscreen;                /* ptr to tn3270 buffer */
  57.     char ** tncursor;                /* ptr to tn3270 cursor */
  58.     char ** tnfield;                /* ptr to tn3270 field * */
  59.  
  60.     /* Hypercard pointers to data */
  61.     Handle hycflag;                    /* hypercard "data ready" flag Handle */
  62. };
  63.  
  64.